﻿Public Class MainWindow

    'Close application after confirmation
    Private Sub tsmiExit_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles tsmiExit.Click
        Dim Result As Windows.Forms.DialogResult

        Result = MessageBox.Show("Are you sure you want to close the program?", "Are you sure?", MessageBoxButtons.YesNo)

        If (Result = Windows.Forms.DialogResult.Yes) Then
            Application.Exit()
        End If
    End Sub

    'Select a folder and search the folder for videofiles.
    Private Sub tsmiSearchFolder_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles tsmiSearchFolder.Click
        Dim FolderSelector As New FolderBrowserDialog

        FolderSelector.ShowDialog()

        If (FolderSelector.SelectedPath.Count <> 0) Then
            MessageBox.Show(FolderSelector.SelectedPath, "Selected Path", MessageBoxButtons.OK)
            'TODO
            'Find all videofiles.
        End If
    End Sub

    Private Sub tsmiHelp_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles tsmiHelp.Click
        'TODO
        'Open Helpfile/Helpsite
        MessageBox.Show("Later on this item will open a help file or a webpage with more information", "Under development", MessageBoxButtons.OK)
    End Sub

    Private Sub tsmiAbout_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles tsmiAbout.Click
        Dim AboutForm As New About
        AboutForm.ShowDialog()
    End Sub
End Class
